﻿

namespace Mulala.Cavan.Domain.MainBoundedContext.SecurityModule
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Diagnostics.Contracts;
    using System.ComponentModel.DataAnnotations;
    using Mulala.Cavan.Domain.Seedwork;
    using Mulala.Cavan.Domain.MainBoundedContext.ChargeModule;
    using Mulala.Cavan.Domain.MainBoundedContext.LogModule;
    using Mulala.Cavan.Domain.MainBoundedContext.InformationModule;
    using FluentValidation.Attributes;
    using System.ComponentModel;
    using System.Web.Mvc;

    [Serializable]
    [Validator(typeof(UserAccountValidator))]
    public class UserAccount : Persistent
    {
        [DisplayName("用户名")]
        [Remote("CheckUserAccountExists", "UserAccount", ErrorMessage = "用户账号已存在")]
        public virtual string Name { get; set; }
        [DisplayName("密码")]
        public virtual string Password { get; set; }
        [DisplayName("邮箱")]
        public virtual string Email { get; set; }
        public virtual int Score { get; set; }
        public virtual int Experience { get; set; }
        public virtual int Liveness { get; set; }
        public virtual int AskCount { get; set; }
        public virtual int AnswerCount { get; set; }
        public virtual int AcceptedCount { get; set; }
        public virtual DateTime LastActiveTime { get; set; }
        public virtual bool IsLocked { get; set; }
        public virtual bool IsDeleted { get; set; }
        public virtual decimal CreditLimit { get; set; }
        public virtual IList<Role> Roles { get; set; }
        public virtual IList<UserService> UserServices { get; set; }
        public virtual IList<VisitHistory> Visitors { get; set; }
        public virtual IList<Note> Notes { get; set; }
        public virtual IList<UserMessage> UserMessages { get; set; }
        public virtual string LoginName { get; set; }
    }
}
